home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 0022-3.564 / dmg-3421 / gfa_basi.c / gfademo.txt / gfademo.txt
Text File  |  1997-06-21  |  4KB  |  138 lines

  1. SMALL GFA DEMO
  2.  
  3. Super small gfa demo...
  4.  
  5. This is a very small GFA demo, but it works good and the effect is
  6. really nice. The hole screen scrolls very smooth horizontal with a
  7. picture of your own. You can use this program in low or in medium
  8. resolution. In the line INLINE bild%,32034 you can put you picture
  9. made in Degas (Elite) or Neo Master (store it as an PI1 picture).
  10. You can do this by using the routine that has the REM marks (') for
  11. the lines. By removing them the routine to read a picture is acctivated.
  12. You only have to do this once because the picture will stay in the INLINE
  13. so after you run the program once, you can delete the lines or put an '
  14. sign for it again...
  15. Enjoy yourself with it, on this disk in the folder G_F_A_PROGS the 
  16. program stand under the nam GFADEMO.LST. Read it in in any GFA basic
  17. version 3.xx and up...
  18.  
  19.                                               Bonus Software        
  20.  
  21. INLINE bild%,32034
  22. RESERVE 400000                              ! RESERVE MEMORY FOR SCREENS
  23. '
  24. ' FILESELECT "A:\PICTURES\*.PI1","",A$      ! USE FILESELECTOR TO CHOOSE
  25. ' IF A$<>""                                 ! IF A$ ISN'T EMPTY
  26. ' BLOAD A$,BILD%                            ! LOAD PICTURE TO BILD%
  27. ' ENDIF                                     ! END
  28. '
  29. VOID XBIOS(6,L:bild%+2)                     ! set up colors
  30. DIM a%((32000*10+255)/4)                    ! make space for screens
  31. a%=VARPTR(a%(0))+255 AND &HFFFF00           ! start address
  32. BMOVE bild%+34,a%,32000                     ! picture in screen 1
  33. BMOVE bild%+34,a%+32000,32000               !   "     "     "   2
  34. BMOVE bild%+34,a%+32000*2+160*2,32000       !   "
  35. BMOVE bild%+34,a%+32000*3+160*2,32000       !   "
  36. BMOVE bild%+34,a%+32000*4+160*4,32000       !   "
  37. BMOVE bild%+34,a%+32000*5+160*4,32000       !   "
  38. BMOVE bild%+34,a%+32000*6+160*6,32000       !   "
  39. BMOVE bild%+34,a%+32000*7+160*6,32000       ! picture in screen 8
  40. REPEAT                                      !
  41.   FOR b%=a% TO a%+32000-1280 STEP 1280
  42.     VOID XBIOS(5,L:-1,L:b%+32000*6,-1)      ! swap screen
  43.     VSYNC                                   ! synchronisation
  44.     color                                   ! gosub to color proc
  45.     VOID XBIOS(5,L:-1,L:b%+32000*4,-1)
  46.     VSYNC
  47.     color
  48.     VOID XBIOS(5,L:-1,L:b%+32000*2,-1)
  49.     VSYNC
  50.     color
  51.     VOID XBIOS(5,L:-1,L:b%,-1)
  52.     VSYNC
  53.     color
  54.   NEXT b%
  55. UNTIL MOUSEK<>0                             !keep on swapping till mousekey
  56. VOID XBIOS(5,L:-1,L:XBIOS(3),-1)            !return to real screen...
  57. RESERVE                                     !GIVE MEMORY FREE AGAIN
  58. PROCEDURE color                             ! color proc
  59.   SETCOLOR 0,0,0,0                          ! the one that makes the raster
  60.   SETCOLOR 0,1,0,0                          ! colors...
  61.   SETCOLOR 0,2,0,0
  62.   SETCOLOR 0,3,0,0
  63.   SETCOLOR 0,4,0,0
  64.   SETCOLOR 0,5,0,0
  65.   SETCOLOR 0,6,0,0
  66.   SETCOLOR 0,7,0,0
  67.   SETCOLOR 0,7,1,0
  68.   SETCOLOR 0,7,2,0
  69.   SETCOLOR 0,7,3,0
  70.   SETCOLOR 0,7,4,0
  71.   SETCOLOR 0,7,5,0
  72.   SETCOLOR 0,7,6,0
  73.   SETCOLOR 0,7,7,0
  74.   SETCOLOR 0,7,7,1
  75.   SETCOLOR 0,7,7,2
  76.   SETCOLOR 0,7,7,3
  77.   SETCOLOR 0,7,7,4
  78.   SETCOLOR 0,7,7,5
  79.   SETCOLOR 0,7,7,6
  80.   SETCOLOR 0,7,7,7
  81.   SETCOLOR 0,6,7,7
  82.   SETCOLOR 0,5,7,7
  83.   SETCOLOR 0,4,7,7
  84.   SETCOLOR 0,3,7,7
  85.   SETCOLOR 0,2,7,7
  86.   SETCOLOR 0,1,7,7
  87.   SETCOLOR 0,0,7,7
  88.   SETCOLOR 0,0,6,7
  89.   SETCOLOR 0,0,5,7
  90.   SETCOLOR 0,0,4,7
  91.   SETCOLOR 0,0,3,7
  92.   SETCOLOR 0,0,2,7
  93.   SETCOLOR 0,0,1,7
  94.   SETCOLOR 0,0,0,7
  95.   SETCOLOR 0,0,0,6
  96.   SETCOLOR 0,0,0,5
  97.   SETCOLOR 0,0,0,4
  98.   SETCOLOR 0,0,0,3
  99.   SETCOLOR 0,0,0,2
  100.   SETCOLOR 0,0,0,1
  101.   SETCOLOR 0,0,0,0
  102.   SETCOLOR 0,1,0,0
  103.   SETCOLOR 0,2,0,0
  104.   SETCOLOR 0,3,0,0
  105.   SETCOLOR 0,4,0,0
  106.   SETCOLOR 0,5,0,0
  107.   SETCOLOR 0,6,0,0
  108.   SETCOLOR 0,7,0,0
  109.   SETCOLOR 0,7,1,0
  110.   SETCOLOR 0,7,2,0
  111.   SETCOLOR 0,7,3,0
  112.   SETCOLOR 0,7,4,0
  113.   SETCOLOR 0,7,5,0
  114.   SETCOLOR 0,7,6,0
  115.   SETCOLOR 0,7,7,0
  116.   SETCOLOR 0,7,7,1
  117.   SETCOLOR 0,7,7,2
  118.   SETCOLOR 0,7,7,3
  119.   SETCOLOR 0,7,7,4
  120.   SETCOLOR 0,7,7,5
  121.   SETCOLOR 0,7,7,6
  122.   SETCOLOR 0,7,7,7
  123.   SETCOLOR 0,6,7,7
  124.   SETCOLOR 0,5,7,7
  125.   SETCOLOR 0,4,7,7
  126.   SETCOLOR 0,3,7,7
  127.   SETCOLOR 0,2,7,7
  128.   SETCOLOR 0,1,7,7
  129.   SETCOLOR 0,0,7,7
  130.   SETCOLOR 0,0,6,7
  131.   SETCOLOR 0,0,5,7
  132.   SETCOLOR 0,0,4,7
  133.   SETCOLOR 0,0,3,7
  134.   SETCOLOR 0,0,2,7
  135. RETURN
  136.  
  137.  
  138.